package Employee;

public class Employee {
    private int id;
    private String name;
    private int age;
    private String position;
    private String department;

    private static int attendanceCount = 0;

    public Employee()
    {
        this.id = 0;
        this.name = "Unknown";
        this.age = 0;
        this.position = "Unknown";
        this.department = "Unknown";
    }

    public Employee(int id, String name, int age, String position, String department)
    {
        this.id = id;
        this.name = name;
        this.age = age;
        this.position = position;
        this.department = department;
    }

    public String getName() {
        return name;
    }

    public void sign_in(String name)
    {
        attendanceCount++;
        System.out.println(name + "已经签到，当前共有 " + attendanceCount + " 人已签到。");
    }

    public void displayInfo()
    {
        System.out.println("编号： " + id);
        System.out.println("姓名： " + name);
        System.out.println("年龄： " + age);
        System.out.println("职务： " + position);
        System.out.println("部门： " + department);
    }

    public static void main(String[] args)
    {
        Employee employee1 = new Employee(1, "张三", 30, "经理", "销售部");
        Employee employee2 = new Employee(2, "李四", 25, "工程师", "技术部");

        employee1.sign_in(employee1.getName());
        employee2.sign_in(employee2.getName());

        System.out.println("\n员工1的详细信息:");
        employee1.displayInfo();

        System.out.println("\n员工2的详细信息:");
        employee2.displayInfo();
    }
}
